<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="renderer" content="webkit">
    <link rel="stylesheet" type="text/css" href="css/styles.css">
    <link rel="stylesheet" type="text/css" href="css/admin.css">

    <script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
    <script type="text/javascript" src="js/admin.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            //重新绑定表单提交
            $("#add_btn").bind("click", function () {
                $('form').submit();
            });

        });
    </script>

</head>

<body>
<div class="panel admin-panel">
    <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>农民档案信息</strong></div>
    <div class="body-content">
        <form id="form-addrole" method="post" class="form-x" action="<%=path%>/ruraledit">
            <input id="id" name="id" value="${rural.id}" type="hidden"/>
            <div class="form-group">
                <div class="label">
                    <label>县级编号：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.countyId}" name="countyId"
                           data-validate=" required:请输入机构编号"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>家庭编号：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.familyId}" name="familyId"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>农合证号：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.peasantId}" name="peasantId"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>医疗证卡号：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.medicalCare}" name="medicalCare"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>户内编号：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.householdId}" name="householdId"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>姓名：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.fullName}" name="fullName"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>与户主关系：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.relation}" name="relation"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>身份证号：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.identityCard}" name="identityCard"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>性别：</label>
                </div>
                <select name="sex" class="input "
                        style="width:250px; line-height:17px;display:inline-block;float: left">
                    <option value="${rural.sex}">${rural.sex}</option>
                    <c:if test="${rural.sex.equals('男')}">
                        <option value="女"> 女</option>
                    </c:if>
                    <c:if test="${rural.sex.equals('女')}">
                        <option value="男"> 男</option>
                    </c:if>
                </select>


                <%--       <div class="field">
                           <input type="text" class="input w50" value="${rural.sex}" name="sex" data-validate=" required:请输入机构名称" />
                           <div class="tips"></div>
                       </div>--%>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>是否农村户口：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.attribute}" name="attribute"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>联系电话：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.telephone}" name="telephone"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>常住地址址：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.permanentAddress}" name="permanentAddress"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>健康状况：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.health}" name="health"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>民族：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.nation}" name="nation"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>文化程度：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.culture}" name="culture"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>年龄：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.year}" name="year"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>

            <div class="form-group">
                <div class="label">
                    <label>出生日期：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.birthday}" name="birthday"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>人员属性：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.personnerAttributes}" name="personnerAttributes"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>职业：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.occupation}" name="occupation"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>工作单位：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.workUnit}" name="workUnit"
                           data-validate=" required:请输入机构名称"/>
                    <div class="tips"></div>
                </div>
            </div>
            <div class="form-group">
                <div class="label">
                    <label>联系方式：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="${rural.contactWay}" name="contactWay">
                    <div class="tips"></div>
                </div>
            </div>

            <div class="form-group">
                <div class="label">
                    <label></label>
                </div>
                <div class="field">
                    <button id="add_btn" class="button bg-main icon-check-square-o" type="button"> 提交</button>
                </div>
            </div>

        </form>
    </div>
</div>

</body>
</html>
